package com.ddxz.tool.web.component;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

/**
 * @author 朱宗刚
 * @version 1.0.0
 * @description com.casic.common.tools.component.CasicWebMvcConfig
 * @date 2020/4/9
 */
@Slf4j
public class DdxzWebMvcConfig extends WebMvcConfigurationSupport {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/**")
                .addResourceLocations("classpath:/static/");
        registry.addResourceHandler("swagger-ui.html", "doc.html")
                .addResourceLocations("classpath:/META-INFO/resources/");
        registry.addResourceHandler("/webjars/**")
                .addResourceLocations("classpath:/META-INFO/resource/webjars/");

        super.addResourceHandlers(registry);
    }
}
